package com.sofar.gems.framework.controller;


import com.alibaba.fastjson.JSONObject;
import com.fasterxml.jackson.databind.util.JSONPObject;
import com.sofar.gems.framework.entity.StudentInfo;
import com.sofar.gems.framework.service.IStudentInfoService;
import com.sofar.gems.framework.vo.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

/**
 * @author FENGZENG
 * @ClassName GrdController
 * @date 2021/9/21 17:23
 * @Description graduation controller
 */
@RestController
@RequestMapping("/grd")
public class GrdController {

    @Autowired
    private IStudentInfoService studentInfoService;

    @RequestMapping("/t")
    public String t() {
        return "success";
    }


    @PostMapping("/mod")
    public R<?> modInfo(@RequestBody JSONObject json) {


        StudentInfo studentInfo = json.toJavaObject(StudentInfo.class);

        studentInfoService.insertSelective(studentInfo);
        return R.success("插入数据成功");

    }




}
